package wjp.service.impl;

import java.util.List;

import org.springframework.transaction.annotation.Transactional;

import wjp.bean.Active;
import wjp.bean.Group;
import wjp.bean.Result;
import wjp.bean.Trail;
import wjp.dao.TrailDao;
import wjp.service.TrailService;
@Transactional
public class TrailServiceImpl implements TrailService {
	private TrailDao trailDao; 
	
	public TrailDao getTrailDao() {
		return trailDao;
	}

	public void setTrailDao(TrailDao trailDao) {
		this.trailDao = trailDao;
	}

	@Override
	public List<Trail> list(String serachStr, Integer pageNum,
			Integer numPerPage) {	
		return trailDao.list(serachStr, pageNum, numPerPage);
	}

	@Override
	public Result<Trail> findById(int id) {
		// TODO Auto-generated method stub
		return trailDao.findById(id);
	}

	@Override
	public void save(Trail trail) {
		trailDao.save(trail);
	}

	@Override
	public void update(Trail trail) {
		trailDao.update(trail);
	}

	@Override
	public void delete(Trail trail) {
		trailDao.delete(trail);
	}

	@Override
	public void delete(int id) {
		trailDao.delete(id);
	}

	@Override
	public Integer totalCount(String serachStr) {
		return trailDao.totalCount(serachStr);
	}

	@Override
	public Result<Trail> apiList(Active active) {
		return trailDao.apiList(active);
	}

}
